
/**
 * @name 封装前端小程序访问云函数 
 * @param {访问的云函数名称} name 
 * @param {参数} data 
 */
export const fetch = async (name, data, config) => {
  const response = await wx.cloud.callFunction({
    name,
    data,
    config
  })
  console.log('fetch:', response)
  return response.result
}